<template>
  <div>
    <el-divider />
    <h4>MG-QOL15评分量表</h4>
    <el-form ref="form" :model="form" label-width="300px">
      <el-form-item label="得分">
        <el-input v-model="score" style="width:200px" disabled />
      </el-form-item>
      <el-form-item label="我对自己的病情有挫折感:">
        <el-radio-group v-model="form.mgQol1">
          <el-radio :label="0">完全没有</el-radio>
          <el-radio :label="1">偶尔</el-radio>
          <el-radio :label="2">有一些</el-radio>
          <el-radio :label="3">经常有</el-radio>
          <el-radio :label="4">非常有</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="我用眼有困难:">
        <el-radio-group v-model="form.mgQol2">
          <el-radio :label="0">完全没有</el-radio>
          <el-radio :label="1">偶尔</el-radio>
          <el-radio :label="2">有一些</el-radio>
          <el-radio :label="3">经常有</el-radio>
          <el-radio :label="4">非常有</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="我吃东西有困难:">
        <el-radio-group v-model="form.mgQol3">
          <el-radio :label="0">完全没有</el-radio>
          <el-radio :label="1">偶尔</el-radio>
          <el-radio :label="2">有一些</el-radio>
          <el-radio :label="3">经常有</el-radio>
          <el-radio :label="4">非常有</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="因为病情而导致我社交活动受限:">
        <el-radio-group v-model="form.mgQol4">
          <el-radio :label="0">完全没有</el-radio>
          <el-radio :label="1">偶尔</el-radio>
          <el-radio :label="2">有一些</el-radio>
          <el-radio :label="3">经常有</el-radio>
          <el-radio :label="4">非常有</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="我的病情限制了我的兴趣爱好活动:">
        <el-radio-group v-model="form.mgQol5">
          <el-radio :label="0">完全没有</el-radio>
          <el-radio :label="1">偶尔</el-radio>
          <el-radio :label="2">有一些</el-radio>
          <el-radio :label="3">经常有</el-radio>
          <el-radio :label="4">非常有</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="我不能很好地满足家庭需要:">
        <el-radio-group v-model="form.mgQol6">
          <el-radio :label="0">完全没有</el-radio>
          <el-radio :label="1">偶尔</el-radio>
          <el-radio :label="2">有一些</el-radio>
          <el-radio :label="3">经常有</el-radio>
          <el-radio :label="4">非常有</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="我需要根据我的身体情况定制计划:">
        <el-radio-group v-model="form.mgQol7">
          <el-radio :label="0">完全没有</el-radio>
          <el-radio :label="1">偶尔</el-radio>
          <el-radio :label="2">有一些</el-radio>
          <el-radio :label="3">经常有</el-radio>
          <el-radio :label="4">非常有</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="我的职业技能和工作状态受到了影响:">
        <el-radio-group v-model="form.mgQol8">
          <el-radio :label="0">完全没有</el-radio>
          <el-radio :label="1">偶尔</el-radio>
          <el-radio :label="2">有一些</el-radio>
          <el-radio :label="3">经常有</el-radio>
          <el-radio :label="4">非常有</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="我说话有困难:">
        <el-radio-group v-model="form.mgQol9">
          <el-radio :label="0">完全没有</el-radio>
          <el-radio :label="1">偶尔</el-radio>
          <el-radio :label="2">有一些</el-radio>
          <el-radio :label="3">经常有</el-radio>
          <el-radio :label="4">非常有</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="我骑车、开车有困难:">
        <el-radio-group v-model="form.mgQol10">
          <el-radio :label="0">完全没有</el-radio>
          <el-radio :label="1">偶尔</el-radio>
          <el-radio :label="2">有一些</el-radio>
          <el-radio :label="3">经常有</el-radio>
          <el-radio :label="4">非常有</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="我对我的病情感到抑郁:">
        <el-radio-group v-model="form.mgQol11">
          <el-radio :label="0">完全没有</el-radio>
          <el-radio :label="1">偶尔</el-radio>
          <el-radio :label="2">有一些</el-radio>
          <el-radio :label="3">经常有</el-radio>
          <el-radio :label="4">非常有</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="我行走有困难:">
        <el-radio-group v-model="form.mgQol12">
          <el-radio :label="0">完全没有</el-radio>
          <el-radio :label="1">偶尔</el-radio>
          <el-radio :label="2">有一些</el-radio>
          <el-radio :label="3">经常有</el-radio>
          <el-radio :label="4">非常有</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="我对我的病情感到悲哀、悲痛、绝望:">
        <el-radio-group v-model="form.mgQol13">
          <el-radio :label="0">完全没有</el-radio>
          <el-radio :label="1">偶尔</el-radio>
          <el-radio :label="2">有一些</el-radio>
          <el-radio :label="3">经常有</el-radio>
          <el-radio :label="4">非常有</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="我在个人打扮、穿着方面有困难、悲痛、绝望:">
        <el-radio-group v-model="form.mgQol14">
          <el-radio :label="0">完全没有</el-radio>
          <el-radio :label="1">偶尔</el-radio>
          <el-radio :label="2">有一些</el-radio>
          <el-radio :label="3">经常有</el-radio>
          <el-radio :label="4">非常有</el-radio>
        </el-radio-group>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        mgQol1: 0,
        mgQol2: 0,
        mgQol3: 0,
        mgQol4: 0,
        mgQol5: 0,
        mgQol6: 0,
        mgQol7: 0,
        mgQol8: 0,
        mgQol9: 0,
        mgQol10: 0,
        mgQol11: 0,
        mgQol12: 0,
        mgQol13: 0,
        mgQol14: 0,
        pId: this.pId,
        id: ''
      }
    }
  },
  inject: [
    'pId'
  ],
  computed: {
    score() {
      var sum = Object.values(this.form).reduce((x, y) => x + y)
      return sum
    }
  }
}
</script>

<style>

</style>
